3.89 \(\int \frac{x \left (A+B x+C x^2+D x^3\right )}{a+b x^2} \, dx\)

Optimal. Leaf size=92 \[ \frac{(A b-a C) \log \left (a+b x^2\right )}{2 b^2}-\frac{\sqrt{a} (b B-a D) \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{b^{5/2}}+\frac{x (b B-a D)}{b^2}+\frac{C x^2}{2 b}+\frac{D x^3}{3 b} \]

[Out]

((b*B - a*D)*x)/b^2 + (C*x^2)/(2*b) + (D*x^3)/(3*b) - (Sqrt[a]*(b*B - a*D)*ArcTa
n[(Sqrt[b]*x)/Sqrt[a]])/b^(5/2) + ((A*b - a*C)*Log[a + b*x^2])/(2*b^2)

_______________________________________________________________________________________

Rubi [A]  time = 0.210285, antiderivative size = 92, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.154 \[ \frac{(A b-a C) \log \left (a+b x^2\right )}{2 b^2}-\frac{\sqrt{a} (b B-a D) \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{b^{5/2}}+\frac{x (b B-a D)}{b^2}+\frac{C x^2}{2 b}+\frac{D x^3}{3 b} \]

Antiderivative was successfully verified.

[In]  Int[(x*(A + B*x + C*x^2 + D*x^3))/(a + b*x^2),x]

[Out]

((b*B - a*D)*x)/b^2 + (C*x^2)/(2*b) + (D*x^3)/(3*b) - (Sqrt[a]*(b*B - a*D)*ArcTa
n[(Sqrt[b]*x)/Sqrt[a]])/b^(5/2) + ((A*b - a*C)*Log[a + b*x^2])/(2*b^2)

_______________________________________________________________________________________

Rubi in Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \frac{C \int x\, dx}{b} + \frac{D x^{3}}{3 b} - \frac{\sqrt{a} \left (B b - D a\right ) \operatorname{atan}{\left (\frac{\sqrt{b} x}{\sqrt{a}} \right )}}{b^{\frac{5}{2}}} + \left (B b - D a\right ) \int \frac{1}{b^{2}}\, dx + \frac{\left (A b - C a\right ) \log{\left (a + b x^{2} \right )}}{2 b^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(x*(D*x**3+C*x**2+B*x+A)/(b*x**2+a),x)

[Out]

C*Integral(x, x)/b + D*x**3/(3*b) - sqrt(a)*(B*b - D*a)*atan(sqrt(b)*x/sqrt(a))/
b**(5/2) + (B*b - D*a)*Integral(b**(-2), x) + (A*b - C*a)*log(a + b*x**2)/(2*b**
2)

_______________________________________________________________________________________

Mathematica [A]  time = 0.123848, size = 81, normalized size = 0.88 \[ \frac{3 (A b-a C) \log \left (a+b x^2\right )+x (-6 a D+6 b B+b x (3 C+2 D x))}{6 b^2}+\frac{\sqrt{a} (a D-b B) \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{b^{5/2}} \]

Antiderivative was successfully verified.

[In]  Integrate[(x*(A + B*x + C*x^2 + D*x^3))/(a + b*x^2),x]

[Out]

(Sqrt[a]*(-(b*B) + a*D)*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/b^(5/2) + (x*(6*b*B - 6*a*D
 + b*x*(3*C + 2*D*x)) + 3*(A*b - a*C)*Log[a + b*x^2])/(6*b^2)

_______________________________________________________________________________________

Maple [A]  time = 0.006, size = 106, normalized size = 1.2 \[{\frac{D{x}^{3}}{3\,b}}+{\frac{C{x}^{2}}{2\,b}}+{\frac{Bx}{b}}-{\frac{Dxa}{{b}^{2}}}+{\frac{\ln \left ( b{x}^{2}+a \right ) A}{2\,b}}-{\frac{\ln \left ( b{x}^{2}+a \right ) aC}{2\,{b}^{2}}}-{\frac{Ba}{b}\arctan \left ({bx{\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}}+{\frac{{a}^{2}D}{{b}^{2}}\arctan \left ({bx{\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(x*(D*x^3+C*x^2+B*x+A)/(b*x^2+a),x)

[Out]

1/3*D*x^3/b+1/2*C*x^2/b+B*x/b-1/b^2*D*x*a+1/2/b*ln(b*x^2+a)*A-1/2/b^2*ln(b*x^2+a
)*a*C-1/b/(a*b)^(1/2)*arctan(x*b/(a*b)^(1/2))*a*B+1/b^2/(a*b)^(1/2)*arctan(x*b/(
a*b)^(1/2))*a^2*D

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((D*x^3 + C*x^2 + B*x + A)*x/(b*x^2 + a),x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.239165, size = 1, normalized size = 0.01 \[ \left [\frac{2 \, D b x^{3} + 3 \, C b x^{2} - 3 \,{\left (D a - B b\right )} \sqrt{-\frac{a}{b}} \log \left (\frac{b x^{2} - 2 \, b x \sqrt{-\frac{a}{b}} - a}{b x^{2} + a}\right ) - 6 \,{\left (D a - B b\right )} x - 3 \,{\left (C a - A b\right )} \log \left (b x^{2} + a\right )}{6 \, b^{2}}, \frac{2 \, D b x^{3} + 3 \, C b x^{2} + 6 \,{\left (D a - B b\right )} \sqrt{\frac{a}{b}} \arctan \left (\frac{x}{\sqrt{\frac{a}{b}}}\right ) - 6 \,{\left (D a - B b\right )} x - 3 \,{\left (C a - A b\right )} \log \left (b x^{2} + a\right )}{6 \, b^{2}}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((D*x^3 + C*x^2 + B*x + A)*x/(b*x^2 + a),x, algorithm="fricas")

[Out]

[1/6*(2*D*b*x^3 + 3*C*b*x^2 - 3*(D*a - B*b)*sqrt(-a/b)*log((b*x^2 - 2*b*x*sqrt(-
a/b) - a)/(b*x^2 + a)) - 6*(D*a - B*b)*x - 3*(C*a - A*b)*log(b*x^2 + a))/b^2, 1/
6*(2*D*b*x^3 + 3*C*b*x^2 + 6*(D*a - B*b)*sqrt(a/b)*arctan(x/sqrt(a/b)) - 6*(D*a
- B*b)*x - 3*(C*a - A*b)*log(b*x^2 + a))/b^2]

_______________________________________________________________________________________

Sympy [A]  time = 1.80254, size = 211, normalized size = 2.29 \[ \frac{C x^{2}}{2 b} + \frac{D x^{3}}{3 b} + \left (- \frac{- A b + C a}{2 b^{2}} - \frac{\sqrt{- a b^{5}} \left (- B b + D a\right )}{2 b^{5}}\right ) \log{\left (x + \frac{- A b + C a + 2 b^{2} \left (- \frac{- A b + C a}{2 b^{2}} - \frac{\sqrt{- a b^{5}} \left (- B b + D a\right )}{2 b^{5}}\right )}{- B b + D a} \right )} + \left (- \frac{- A b + C a}{2 b^{2}} + \frac{\sqrt{- a b^{5}} \left (- B b + D a\right )}{2 b^{5}}\right ) \log{\left (x + \frac{- A b + C a + 2 b^{2} \left (- \frac{- A b + C a}{2 b^{2}} + \frac{\sqrt{- a b^{5}} \left (- B b + D a\right )}{2 b^{5}}\right )}{- B b + D a} \right )} - \frac{x \left (- B b + D a\right )}{b^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(x*(D*x**3+C*x**2+B*x+A)/(b*x**2+a),x)

[Out]

C*x**2/(2*b) + D*x**3/(3*b) + (-(-A*b + C*a)/(2*b**2) - sqrt(-a*b**5)*(-B*b + D*
a)/(2*b**5))*log(x + (-A*b + C*a + 2*b**2*(-(-A*b + C*a)/(2*b**2) - sqrt(-a*b**5
)*(-B*b + D*a)/(2*b**5)))/(-B*b + D*a)) + (-(-A*b + C*a)/(2*b**2) + sqrt(-a*b**5
)*(-B*b + D*a)/(2*b**5))*log(x + (-A*b + C*a + 2*b**2*(-(-A*b + C*a)/(2*b**2) +
sqrt(-a*b**5)*(-B*b + D*a)/(2*b**5)))/(-B*b + D*a)) - x*(-B*b + D*a)/b**2

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.237712, size = 119, normalized size = 1.29 \[ -\frac{{\left (C a - A b\right )}{\rm ln}\left (b x^{2} + a\right )}{2 \, b^{2}} + \frac{{\left (D a^{2} - B a b\right )} \arctan \left (\frac{b x}{\sqrt{a b}}\right )}{\sqrt{a b} b^{2}} + \frac{2 \, D b^{2} x^{3} + 3 \, C b^{2} x^{2} - 6 \, D a b x + 6 \, B b^{2} x}{6 \, b^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((D*x^3 + C*x^2 + B*x + A)*x/(b*x^2 + a),x, algorithm="giac")

[Out]

-1/2*(C*a - A*b)*ln(b*x^2 + a)/b^2 + (D*a^2 - B*a*b)*arctan(b*x/sqrt(a*b))/(sqrt
(a*b)*b^2) + 1/6*(2*D*b^2*x^3 + 3*C*b^2*x^2 - 6*D*a*b*x + 6*B*b^2*x)/b^3